home *** CD-ROM | disk | FTP | other *** search
- in.file$=command$
- if in.file$<"!" then
- line input "Enter input filename:";in.file$
- if len(in.file$)>12 then print "Illegal filename.":stop
- end if
- a%=instr(in.file$,".")
- if a%>0 then
- out.file$=left$(in.file$,a%)+"bas"
- else
- out.file$=in.file$+".bas"
- end if
- print in.file$"-->"out.file$" Ending at POP BP instruction."
- open in.file$ for input as 1
- open out.file$ for output as 2
- print #2,"SUB "left$(out.file$,instr(out.file$,".")-1)" INLINE"
- while not eof(1)
- line input #1,a$
- a%=instr(a$,":") 'find address marker so we know where we are.
- if a%>0 then
- print #2," $INLINE ";
- l%=a%+6 'Length outputed on line so far.
- while mid$(a$,l%,2)>"!" 'while there are bytes to output
- if l%>a%+6 then print #2,","; 'we need comma's between hex codes.
- print #2,"&H"mid$(a$,l%,2);:l%=l%+2
- wend
- 'Now show instruction as a comment just for readablity.
- print #2,tab(31)"'";mid$(a$,a%+2,3)" "mid$(a$,a%+20)
- end if
- a%=instr(a$,"POP"):if a%>0 then if instr(a%,a$,"BP")>0 then goto done
- wend
- done:
- print #2,"END SUB"
- close 1,2
-
-